import React from 'react'
import {Switch,Route,Redirect} from 'react-router-dom'
import {Provider} from 'react-redux'
import store from './store/store'
import Token from './utils/Token'
import Admin from './pages/Admin'
import Login from './pages/Login'
import './App.css'
function App() {
  return (<Provider store={store}>

<div>
  <Switch>
    <Route path='/admin' component={Admin}></Route>
    <Route path='/login' component={Login}></Route>
    <Redirect from='/' to='/login'></Redirect>
  </Switch>
</div>
  </Provider>
    
  )
}

export default Token(App)